home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / vdisrc12 / vdioutp2.s < prev    next >
Text File  |  1990-11-23  |  5KB  |  133 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* VDIFAST Public Domain VDI bindings.
  5. ;*
  6. ;*  Maintenance:
  7. ;*   04/26/89 v1.2 - Changed "VContrl 103" to "VCntrl #103" for 
  8. ;*                   v_contourfill() function.
  9. ;*
  10. ;*========================================================================
  11.  
  12.           .iif      !(^^macdef VContrl),.include  "vdimacro.s"
  13.           
  14. ;*************************************************************************
  15. ;*
  16. ;* Less commonly-used output functions.
  17. ;*
  18. ;*************************************************************************
  19.  
  20. ;*------------------------------------------------------------------------
  21. ;* Contour fill.
  22. ;*------------------------------------------------------------------------
  23.  
  24. _v_contourfill::
  25.           .cargs    #8,.handle.w,.x.w,.y.w,.index.w
  26.           link      a6,#0
  27.  
  28.           VContrl   #103,,#1,#1
  29.  
  30.           subq.l    #8,sp               ;* -> ptsout
  31.           pea       .x(a6)              ;* -> ptsin
  32.           pea       .index(a6)          ;* -> intin
  33.           pea       16(sp)              ;* -> contrl
  34.  
  35.           jmp       vdicall
  36.           
  37. ;*------------------------------------------------------------------------
  38. ;* Arc and Pie.
  39. ;*------------------------------------------------------------------------
  40.  
  41. _v_arc::
  42.           moveq.l   #2,d1
  43.           bra.s     varcpie
  44. _v_pieslice::
  45.           moveq.l   #3,d1
  46. varcpie:
  47.           .cargs    #8,.handle.w,.x.w,.y.w,.radius.w,.begang.w,.endang.w
  48.           link      a6,#0
  49.           
  50.           clr.w     -(sp)               ;* There are some unused words
  51.           move.w    .radius(a6),-(sp)   ;* (which must be zeroed) in the
  52.           clr.l     -(sp)               ;* ptsin definition for arc & pie,
  53.           clr.l     -(sp)               ;* so build a temporary ptsin
  54.           move.l    .x(a6),-(sp)        ;* array on the stack.
  55.           move.l    sp,a0               ;* Save pointer to ptsin.
  56.  
  57.           VContrl   #11,d1,#4,#2
  58.           
  59.           subq.l    #8,sp               ;* -> ptsout
  60.           move.l    a0,-(sp)            ;* -> ptsin
  61.           pea       .begang(a6)         ;* -> intin
  62.           pea       16(sp)              ;* -> contrl
  63.  
  64.           jmp       vdicall
  65.  
  66. ;*------------------------------------------------------------------------
  67. ;* Eliptical arc and pie.
  68. ;*------------------------------------------------------------------------
  69.  
  70. _v_ellarc::
  71.           moveq.l   #6,d1
  72.           bra.s     ellarcpie
  73. _v_ellpie::
  74.           moveq.l   #7,d1
  75. ellarcpie:
  76.           .cargs    #8,.handle.w,.x.w,.y.w,.xradius.w,.yradius.w,.begang.w,.endang.w
  77.           link      a6,#0
  78.           
  79.           VContrl   #11,d1,#2,#2
  80.           
  81.           subq.l    #8,sp               ;* -> ptsout
  82.           pea       .x(a6)              ;* -> ptsin
  83.           pea       .begang(a6)         ;* -> intin
  84.           pea       16(sp)              ;* -> contrl
  85.  
  86.           jmp       vdicall
  87.  
  88. ;*------------------------------------------------------------------------
  89. ;* Ellipse.
  90. ;*------------------------------------------------------------------------
  91.  
  92. _v_ellipse::
  93.  
  94.           .cargs    #8,.handle.w,.x.w,.y.w,.xradius.w,.yradius.w
  95.           link      a6,#0
  96.           
  97.           VContrl   #11,#5,#2
  98.           
  99.           subq.l    #8,sp               ;* -> ptsout
  100.           pea       .x(a6)              ;* -> ptsin
  101.           subq.l    #4,sp               ;* -> intin
  102.           pea       16(sp)              ;* -> contrl
  103.  
  104.           jmp       vdicall
  105.           
  106. ;*------------------------------------------------------------------------
  107. ;* Cell array.  What a weird function.
  108. ;*------------------------------------------------------------------------
  109.  
  110. _v_cellarray::
  111.           .cargs    #8,.handle.w,.pxy.l,.rowlen.w,.elused.w,.numrows.w,.wrmode.w,.colarray.l
  112.           link      a6,#0
  113.           
  114.           move.w    .numrows(a6),d0     ;* Save numrows and number of
  115.           move.w    .elused(a6),d1      ;* elements used for intin count
  116.           move.w    .wrmode(a6),-(sp)   ;* calculation later.  Stack the
  117.           move.w    d0,-(sp)            ;* extra contrl parms first.
  118.           move.w    d1,-(sp)
  119.           move.w    .rowlen(a6),-(sp)
  120.           
  121.           mulu      d1,d0               ;* Calc intin count=numrows*elused.
  122.           
  123.           VContrl   #10,,#2,d0          
  124.           
  125.           subq.l    #8,sp               ;* -> ptsout
  126.           move.l    .pxy(a6),-(sp)      ;* -> ptsin
  127.           move.l    .colarray(a6),-(sp) ;* -> intin
  128.           pea        16(sp)             ;* -> contrl
  129.  
  130.           jmp       vdicall
  131.  
  132. ;         end of code
  133.